<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://www.ufida.com/lfw" prefix="lfw" %>
<%@ taglib uri="http://www.ufida.com/uif" prefix="uif" %> 
<%@ taglib uri="http://www.ufida.com/lfwtool" prefix="lfwtool" %> 
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@page import="nc.lfw.core.LfwRuntimeEnvironment"%>
<%@page import="nc.lfw.billtemplate.controller.ILfwControllerBase"%>
<%@page import="nc.lfw.billtemplate.controller.IManageControllerBase"%>
<html>
	<%
		ILfwControllerBase ctrl = LfwRuntimeEnvironment.getWebContext().getController();
		Integer cardIndex = new Integer(0);
		Boolean hasBodyMenu = Boolean.FALSE;
		Boolean supportPf = Boolean.FALSE;
		if(ctrl != null){
			cardIndex = ((IManageControllerBase)ctrl).showCardFirst()? new Integer(1) : new Integer(0);
			if(ctrl instanceof nc.lfw.billtemplate.controller.IBodyOperatorController)
				hasBodyMenu = Boolean.TRUE;
			if(ctrl instanceof nc.lfw.billtemplate.controller.IPFControllerBase)
				supportPf = Boolean.TRUE;
		}
		pageContext.setAttribute("cardIndex", cardIndex);
		pageContext.setAttribute("hasBodyMenu", hasBodyMenu);
		pageContext.setAttribute("supportPf", supportPf);
	%>
	<head>
	<title></title>
		<lfw:base/>
		<lfw:head/>
		<uif:import type="0" supportPf="${supportPf}"/>
	</head>
	<body bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0" scroll=no onload="pageBodyScript()" style="background:${lfwtool:getInfo("background")}">
		<lfw:pageModel showLoadingPage="false">
			<lfw:layout type="border">
				<lfw:layoutPanel position="top" height="23">
					<c:choose>
						<c:when test="${cardIndex == 0}">
							<lfw:menubar id="menubar1"/>
							<lfw:menubar id="menubar2"/>
						</c:when>
						<c:otherwise>
							<lfw:menubar id="menubar2"/>
							<lfw:menubar id="menubar1"/>
						</c:otherwise>
					</c:choose>
				</lfw:layoutPanel>
				<lfw:layoutPanel position="center">
					<div style="width:100%;height:100%;margin:2px">
						<!-- singleHead-->
						<c:if test="${pageType eq 0}">
							<%@include file="manage_singlehead.jsp"%>
						</c:if>
						
						<!-- multiHead -->
						<c:if test="${pageType eq 1}">
							<%@include file="manage_multihead.jsp"%>
						</c:if>
						
						<!-- normal-->
						<c:if test="${pageType eq 2}">
							<%@include file="manage_normal.jsp"%><!-- -->
						</c:if>
					</div>
				</lfw:layoutPanel>
			</lfw:layout>
		</lfw:pageModel>
	</body>
</html>